<div class="grid_9">
<?php if($this->session->flashdata('type')): ?>
	<div class="<?php echo $this->session->flashdata('type')?>"><?php echo $this->session->flashdata('msg')?></div>
<?php endif; ?>
<div class="inner-border">
<h6>Subjects</h6>
<?php if(!empty($db_entries)): ?>
<table>
<thead>
	<th class="level">Subject Name</th><th class="subject_edit"></th><th class="subject_delete"></th>
</thead>

<tbody class="tabular">
	
	<?php 
		$count = 0;
		foreach($db_entries as $db_entry): 
	?>
    	<tr class="<?php echo ($count++%2?'odd':'even')?>">
        	<td><?php echo $db_entry->subject_name; ?></td>
            <td><a href="<?php echo site_url('admin/edit_subject/'.$db_entry->id)?>">Edit</a></td>
            <td><a href="<?php echo site_url('post/delete_subject/'.$db_entry->id)?>" class="del-btn" onClick='return delete_item("<?php echo $db_entry->subject_name; ?>")'>Delete</a></td>
    	</tr>
    <?php endforeach ?>
    
   
    
   
	
</tbody>
</table>
 <?php else: ?>
    <div class="notice">No subjects available</div>
 <?php endif ?>
	
		
<a href="<?php echo site_url('admin/add_subject') ?>" class="btn">Add Subject</a>
</div>
</div>